
  <include file="Public/header" />

      <div class="x12 padding border-bottom height-big">
			<a href="__MODULE__/User/user_attest.html" class="padding text-sub">全部</a>
			<a href="__MODULE__/User/user_attest/status/2" class="padding <if condition="$_GET['status'] eq '2'">text-green<else /> text-sub</if>">已拒绝</a>
			<a href="__MODULE__/User/user_attest/status/1" class="padding <if condition="$_GET['status'] eq '1'">text-green<else /> text-sub</if>">已通过</a>
			<a href="__MODULE__/User/user_attest/status/0" class="padding <if condition="$_GET['status'] eq '0'">text-green<else /> text-sub</if>">未审核</a>
			
	  </div>
      <div class="x12 padding">

        <div class="margin-big-top">
        <table class="table table-bordered table-hover text-small">
          <tbody>
            <tr>
			  <th>手机号码</th>
			  <th>名字</th>
			  <th>性别</th>
			  <th>地区</th>
			  <th>注册时间</th>
			  <th>认证状态</th>
			  <th>操作</th>
            </tr>

            <volist name="lists" id="vo">
            <tr  class="height">
              <td >{$vo.phone}</td>
              <td>{$vo.user_name}</td>
              <td><if condition="$vo['sex'] eq '1' ">男<elseif condition="$vo['sex'] eq 2 "/>女<else />未知</if></td>
              <td>{:region_address($vo['area'])}</td>
              <td>{$vo.create_time|date="Y-m-d H:i",###}</td>
              <td>
			  <if condition="$vo['attest_status'] eq '0' ">
				<span class="text-red">未审核</span>			
			  <elseif condition="$vo['attest_status'] eq '1' "/>
				<span class="text-green">审核通过</span>
				<else />
				已拒绝
			  </if>
			  </td>              
              <td>
				<a href="javascript:void(0)" class="text-blue" onclick="seecard('{$vo.card_positive}')">身份证正面</a>
				<a href="javascript:void(0)" class="text-blue padding-left" onclick="seecard('{$vo.card_negative}')">身份证背面</a>
				<br />
				 <if condition="$vo['attest_status'] eq '0' ">
					<a href="javascript:void(0)" onclick="pass({$vo.id},1)" class="text-sub icon-check "> 通过</a>
					<a href="javascript:void(0)" onclick="pass({$vo.id},2)" class="text-red icon-ban"> 拒绝</a>
				</if>
              </td>
            </tr>
            </volist>
          </tbody>
        </table>
        </div>

        <div class="margin-big-top">
          <ul class="pagination">
            {$page}
          </ul>
        </div>
      </div>
    </div>
  	<!-- 底部 -->
    <include file="foot" />
  </div>
<script>
	function seecard(pic){
		var html='<img src="'+pic+'" width="558"/>';
		layer.open({
			content: html,
			area: ['600px', '500px'],
			scrollbar: false
			});
	}
	//审核
	function pass(id,status){
		$.post('__MODULE__/User/attest_pass',{id:id,status:status},function(ret){
			if(ret.status==1){
				layer.msg(ret.info, {
					offset: 200,
					shift: 2
				});
				window.location.reload()
			}else{
				layer.msg(ret.info, {
					offset: 200,
					shift: 2
				});
			}
		})
	}
</script>
</body>
</html>